//
//  Library.m
//  nova
//
//  Created by user on 11/06/27.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "Library.h"


@implementation Library

+(NSString *) getLocalizedDateString : (double) date{
	NSLocale *currentUsersLocale = [NSLocale currentLocale];
	NSDateFormatter *df = [[NSDateFormatter alloc] init];
	NSString *dateFormat = [NSDateFormatter dateFormatFromTemplate:@"EdMMMYYYY" options:0 locale:currentUsersLocale];
	[df setDateFormat:dateFormat];	
	NSDate * tmpDate  = [NSDate dateWithTimeIntervalSince1970:date];
	NSString *returnString = [[NSString alloc] initWithString:[NSString stringWithFormat:@"%@", [df stringFromDate:tmpDate]]];
	
	[df dealloc];
	return returnString;
}

+(double) getCurrentTime{
	NSDate *current = [NSDate date];
	NSTimeInterval oldTime = [current timeIntervalSince1970];
	return oldTime;
}
@end
